package com.ljh.myrpc.springboot.starter.annotation;

import com.ljh.myrpc.springboot.starter.bootstarp.RpcConsumerBootStarp;
import com.ljh.myrpc.springboot.starter.bootstarp.RpcInitBootStarp;
import com.ljh.myrpc.springboot.starter.bootstarp.RpcProviderBootStarp;
import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 启动RPC注解
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Import({RpcInitBootStarp.class, RpcProviderBootStarp.class, RpcConsumerBootStarp.class})
public @interface EnableRpc {

    /**
     * 需要启动 server
     * @return
     */
    boolean needServer() default true;
}
